.jsx-demo {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: white;
}

.jsx-demo h1 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.demo-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.demo-section {
  background: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.demo-section h2 {
  color: #ffd700;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
  padding-bottom: 0.5rem;
}

.code-example {
  background: rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 1rem;
}

.code-example h3 {
  color: #ffd700;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

/* 属性演示 */
.attribute-demo {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.demo-input {
  padding: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
}

.demo-input:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.demo-button {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(45deg, #ff6b6b, #ee5a24);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.demo-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.demo-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 条件渲染样式 */
.adult {
  color: #4caf50;
  font-weight: 600;
}

.minor {
  color: #ff9800;
  font-weight: 600;
}

.visible {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
  padding: 0.5rem;
  border-radius: 6px;
}

.hidden {
  color: #f44336;
  background: rgba(244, 67, 54, 0.1);
  padding: 0.5rem;
  border-radius: 6px;
}

/* 列表样式 */
.hobbies-list,
.fruits-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hobby-item,
.fruit-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  margin: 0.5rem 0;
  border-radius: 6px;
  border-left: 3px solid #ffd700;
}

/* 样式处理 */
.styled-box {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 嵌套结构 */
.nested-structure {
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

.nested-header {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nested-header h3 {
  margin: 0;
  color: #ffd700;
}

.nested-nav {
  display: flex;
  gap: 1rem;
}

.nested-nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.nested-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nested-main {
  padding: 1rem;
}

.nested-article {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  border-radius: 8px;
}

.nested-article h4 {
  color: #ffd700;
  margin-bottom: 0.5rem;
}

.nested-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* 表单样式 */
.demo-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: #ffd700;
}

.form-input,
.form-textarea {
  padding: 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 1rem;
  font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-button {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(45deg, #4caf50, #45a049);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.form-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .jsx-demo {
    padding: 1rem;
  }
  
  .jsx-demo h1 {
    font-size: 2rem;
  }
  
  .demo-section {
    padding: 1.5rem;
  }
  
  .attribute-demo {
    flex-direction: column;
    align-items: stretch;
  }
  
  .nested-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nested-nav {
    justify-content: center;
  }
  
  .nested-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
} 